# 工程
cmake_minimum_required(VERSION 3.20)

PROJECT(wsserver)
# 手动加入文件
#include_directories("/usr/include/mysql")
#include_directories("/oracle/home/rdbms/public")
#link_directories("/usr/lib64/mysql")
link_directories("/root/wsserver/lib")

link_directories("/root/wsserver")
#link_directories("/oracle/home/lib")
#SET(SRC_LIST wsserver.cpp _mysql.cpp _mysql.h  _ccfree.h _ccfree.cpp _ooci.h _ooci.cpp)
SET(SRC_LIST wsserver.cpp  _ccfree.h _ccfree.cpp)
SET(CMAKE_CXX_STANDARD 11)
set(CMAKE_BUILD_TYPE "Debug")
MESSAGE(STATUS "THIS IS SOURCE DIR " ${PROJECT_SOURCE_DIR})
set(CMAKE_CXX_FLAGS "-std=c++11")
SET(CMAKE_CXX_FLAGS_DEBUG "$ENV{CXXFLAGS} -O0 -Wall -g -ggdb")
ADD_EXECUTABLE(wsserver ${SRC_LIST} )
# target_link_libraries(${PROJECT_NAME}  libmysqlclient.so)
#TARGET_LINK_LIBRARIES(wsserver websockets rt uv dbms mysqlclient clntsh m c)
TARGET_LINK_LIBRARIES(wsserver websockets rt uv dbms m c)
SET(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE) 
SET(CMAKE_INSTALL_RPATH ${SRC_LIST}) #指定运行时动态库的加载路
